package com.handpay.zztong.hp.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import com.handpay.framework.LuaTableUtil;
import com.handpay.zztong.hp.main.model.FunctionInfo;

import se.krka.kahlua.vm.LuaTable;
public class Functions implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final String ID = "_id";
	public static final String USERID = "userId";
	public static final String FUNCTIONID = "functionId";
	public static final String SHOWMODULE = "showModule";
	public static final String INDEX = "_index";
	public static final String LAST_UPDATETIME = "updateTime";

	private int id;
	private String userId;
	private String functionId;
	private String showModule;
	private int index;



	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getFunctionId() {
		return functionId;
	}

	public void setFunctionId(String functionId) {
		this.functionId = functionId;
	}

	public String getShowModule() {
		return showModule;
	}

	public void setShowModule(String showModule) {
		this.showModule = showModule;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

//	public Functions(String id, String userId, String functionId,
//			String showModule, String index) {
//		super();
//		this.id = id;
//		this.userId = userId;
//		this.functionId = functionId;
//		this.showModule = showModule;
//		this.index = index;
//	}

	public Functions() {
		super();
	}

	public Functions(String functionId, int index, String showModule) {
		super();
		this.functionId = functionId;
		this.showModule = showModule;
		this.index = index;
	}

//	public static List<Functions> getFunctionLists(LuaTable luaTable,String items) {
//		List<Functions> functions = new ArrayList<Functions>();
//		if(null != items){
//			LuaTable list = (LuaTable) luaTable.rawget("list");
//			if (list != null) {
//				Vector<LuaTable> dataList = LuaTableUtil.getArray(list);
//				for (LuaTable table : dataList) {
//					Functions functioninfo = new Functions();
//					String id = (String) table.rawget("functionId");
//					String showModule = (String) table.rawget("showModule");
//					int index = Integer.parseInt((String) table.rawget("index"));
//					functioninfo.setFunctionId(id);
//					functioninfo.setShowModule(showModule);
//					functioninfo.setIndex(index);
//					functions.add(functioninfo);
//				}
//			}
//		}
//		return functions;
//	}
	
//	public static List<Functions> getDefultFunctions(){
//		List<Functions>  infos = new ArrayList<Functions>();
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[0], 1, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[1], 2, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[2], 3, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[4], 4, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[5], 5, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[14], 6, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[1], 1, "Service"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[2], 2, "Service"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[13], 3, "Service"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[6], 1, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[7], 2, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[8], 3, "My"));
////		infos.add(new Functions(FunctionInfo.FUNCTIONID[9], 4, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[10], 5, "My"));
////		infos.add(new Functions(FunctionInfo.FUNCTIONID[3], 6, "My"));
//		return infos;
//	}
	
	
//	public static List<Functions> getTestFunctionDatas1(){
//		List<Functions>  infos = new ArrayList<Functions>();
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[0], 1, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[1], 2, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[1], 1, "Service"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[6], 1, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[7], 2, "My"));
//
//		return infos;
//	}
//
//	public static List<Functions> getTestFunctionDatas2(){
//		List<Functions>  infos = new ArrayList<Functions>();
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[0], 1, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[1], 2, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[2], 3, "Home"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[1], 1, "Service"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[2], 2, "Service"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[13], 3, "Service"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[6], 1, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[7], 2, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[8], 3, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[9], 4, "My"));
//		infos.add(new Functions(FunctionInfo.FUNCTIONID[10], 5, "My"));
//		return infos;
//	}

}
